
#!/bin/bash
#type = "Tomcat, Mongo, Nginx"
#action = add  delete
#curl -i -H 'content-type: application/json' -X POST -d '[{"type": "Tomcat", "hostname": "myhostname1", "ip":"172.24.133.41", "place":"cl", "env": "pro"}, {"type": "Mongo", "hostname": "myhostname2", "ip":"172.24.133.41", "place":"cl", "env": "pro"}]'  http://127.0.0.1:5002/infrastructure/monitor/server/delete
#curl -i -H 'content-type: application/json' -X POST -d '[{"type": "Tomcat", "hostname": "flexweb-cl-23", "ip":"172.24.133.101", "place":"cl", "env": "pro"}, {"type": "Mongo", "hostname": "flexweb-cl-24", "ip":"172.24.133.111", "place":"cl", "env": "pro"}]'  http://172.24.133.115:5002/infrastructure/monitor/server/delete


#[{"status": "successful", "msg": "delete machine successfull,monitor server reload conifg sucessfull", "host": "myhostname1"}, {"status": "successful", "msg": "delete machine successfull,monitor server reload conifg sucessfull", "host": "myhostname2"}]

curl -i -H 'content-type: application/json' -X POST -d '[{"type": "Tomcat", "hostname": "flexweb-wx-11", "ip":"221.228.81.208", "place":"wx", "env": "pro"}]'  http://127.0.0.1:5002/infrastructure/monitor/server/add

#curl -i -H 'content-type: application/json' -X POST -d '[{"type": "Mongo", "hostname": "myhostnameng", "ip":"172.24.133.41", "place":"cl", "env": "pro"}]'  http://127.0.0.1:5000/infrastructure/monitor/server/delete